//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatopenTemplateDraft, WechatopenTemplateDraftResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenTemplateDraftList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenTemplateDraftResponse>(`/uctoo/wechatopen_template_draft/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopenTemplateDraft = async (id: string) => {
  return requestClient.get<WechatopenTemplateDraft>(`/uctoo/wechatopen_template_draft/${id}`);
};

export const adductooWechatopenTemplateDraft = async (data: Partial<WechatopenTemplateDraft>) => {
  return requestClient.post<WechatopenTemplateDraft>('/uctoo/wechatopen_template_draft/add', data);
};

export const edituctooWechatopenTemplateDraft = async (data: Partial<WechatopenTemplateDraft>) => {
  return requestClient.post<WechatopenTemplateDraft>('/uctoo/wechatopen_template_draft/edit', data);
};

export const deleteuctooWechatopenTemplateDraft = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen_template_draft/del', { id });
};
